package ClassWork.Work_01;

public class ForDemo {
    public static void main(String[] args) {
        demo1();
        demo2();
        number1();
        number2();
    }
    public static void demo1() {
        for (int i = 8; i >= 1; i--) {
            for (int j = i; j >= 1; j--) {
                System.out.print("*");
            }
            System.out.print("\n");
        }
    }
    public static void demo2() {
        for (int i = 1; i <= 8; i++) {
            for (int j = 1; j <= i; j++) {
                System.out.print("*");
            }
            System.out.print("\n");
        }
    }
    public static void number1() {
        for (int i = 1; i <= 4; i++) {
            for (int j = 1; j <= i; j++) {
                System.out.print("1 ");
            }
            System.out.print("\n");
        }
    }
    public static void number2() {
        int n=1;
        for (int i = 1; i <= 4; i++) {
            for (int j = 1; j <= i; j++) {
                System.out.print(n + " ");
                n++;
            }
            System.out.print("\n");
        }
    }
}